{% extends 'form_div_layout.html.twig' %}

{% block form_row %}
{% spaceless %}
<div class="form-group">
	{{ form_label(form) }}
	{{ form_errors(form) }}
	{{ form_widget(form) }}
</div>
{% endspaceless %}
{% endblock %}

{% block form_widget_simple %}
{% spaceless %}
    {% set type = type|default('text') %}
    <input class="form-control" type="{{ type }}" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}
    placeholder="{{ label|trans({}, translation_domain) }}" />
{% endspaceless %}
{% endblock form_widget_simple %}

{% block form_errors %}
{% spaceless %}
    {% if errors|length > 0 %}
    <ul>
        {% for error in errors %}
            <li class="text-danger">{{ error.message }}</li>
        {% endfor %}
    </ul>
    {% endif %}
{% endspaceless %}
{% endblock form_errors %}